<?php

namespace app\admin\model;

class Userbuyticket extends Base
{

    // 当前模型名称 不带前缀
    protected $name = 'userbuyticket';
    // 定义时间戳字段名
    protected $createTime = 'createDate';
    protected $updateTime = 'updateDate';
    protected $autoWriteTimestamp = 'datetime';

    public function getordersByStoreId($storeId){
        $res = self::where(['storeId'=>$storeId,'status'=>1])->order('createDate DESC')->select();
        return $res;
    }

}